<div class="task">
<?php include ('buttons.tpl'); ?>
</div>
<?php if ($error) { ?>
<div class="warning"><?php echo $error; ?></div>
<?php } ?>
<h2><?php echo $heading_title; ?></h2>
<div class="description"><?php echo $heading_description; ?></div>

<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
  <div id="tabs">
	<ul>
	  <li><a href="#tabs-1"><?php echo $tab_general; ?></a></li>
	  <li><a href="#tabs-2"><?php echo $tab_data; ?></a></li>
	</ul>
	<div id="tabs-1">
      <?php foreach ($extensions as $extension) { ?>
      <fieldset>
        <legend><?php echo $extension['language']; ?></legend>
        <table>
          <tr>
            <td width="185"><span class="required">*</span> <?php echo $entry_name; ?></td>
            <td><input name="extension_language[<?php echo $extension['language_id']; ?>][name]" value="<?php echo $extension['name']; ?>" />
              <?php if ($error_name) { ?>
              <span class="error"><?php echo $error_name; ?></span>
              <?php } ?></td>
          </tr>
          <tr>
            <td valign="top"><span class="required">*</span> <?php echo $entry_description; ?></td>
            <td><textarea name="extension_language[<?php echo $extension['language_id']; ?>][description]" cols="40" rows="5"><?php echo $extension['description']; ?></textarea>
              <?php if ($error_description) { ?>
              <span class="error"><?php echo $error_description; ?></span>
              <?php } ?></td>
          </tr>
        </table>
      </fieldset>
      <?php } ?>
    </div>
    <div id="tabs-2">
      <table>
        <tr>
          <td width="185"><span class="required">*</span> <?php echo $entry_code; ?></td>
          <td><input name="code" value="<?php echo $code; ?>" />
            <?php if ($error_code) { ?>
            <span class="error"><?php echo $error_code; ?></span>
            <?php } ?></td>
        </tr>
        <tr>
          <td><span class="required">*</span> <?php echo $entry_directory; ?></td>
          <td><input name="directory" value="<?php echo $directory; ?>" />
            <?php if ($error_directory) { ?>
            <span class="error"><?php echo $error_directory; ?></span>
            <?php } ?></td>
        </tr>
        <tr>
          <td><span class="required">*</span> <?php echo $entry_filename; ?></td>
          <td><input name="filename" value="<?php echo $filename; ?>" />
            <?php if ($error_filename) { ?>
            <span class="error"><?php echo $error_filename; ?></span>
            <?php } ?></td>
        </tr>
        <tr>
          <td><span class="required">*</span> <?php echo $entry_controller; ?></td>
          <td><input name="controller" value="<?php echo $controller; ?>" />
            <?php if ($error_controller) { ?>
            <span class="error"><?php echo $error_controller; ?></span>
            <?php } ?></td>
        </tr>
      </table>
    </div>
  </div>
  <script type="text/javascript"><!--
	$(function() {
		$("#tabs").tabs();
	});
  //--></script>
</form>
